<script setup lang='ts'>
</script>
<template>
  <div class="home-item">
    <div class="left">
      <el-avatar
        shape="square"
        class="img"
        src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"
        @error="() => true"
      >
        <img src="https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png" />
      </el-avatar>
    </div>
    <div class="right">
      <div class="top">
        <div class="name">测试1</div>
        <div class="time">24/12/20</div>
      </div>
      <div class="bottom">
        <el-text class="msg" truncated>最近的一条消息11111111111111111111111111111111111111111111111111111111111</el-text>
      </div>
    </div>
  </div>
</template>
<style scoped lang='scss'>
.home-item {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  .left {
    display: flex;
    justify-content: center;
    align-items: center;
    .img {
      width: 40px;
      height: 40px;
    }
  }
  .right {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-left: 10px;
    .top {
      display: flex;
      justify-content: space-between;
      height: 20px;
      line-height: 20px;
      .name {
        font-size: 14px;
        font-weight: 600;
      }
      .time {
        font-size: 12px;
        color: #999;
      }
    }
    .bottom {
      height: 20px;
      line-height: 20px;
      .msg {
        width: 150px;
        font-size: 12px;
        color: #999;
      }
    }
  }
}
</style>